Many websites include content from third parties—usually via tags (e.g. <script src=“http://thirdparty/ . . . ”>). These third parties may provide services to the website, such as ad-serving, analytics, social media, user support, and many other desirable functionalities. Some third parties also include other third parties—most notably ad-servers, which often serve rich experiences that are created by creative-agencies, or defer the serving to other ad-networks. Because of how HTML and JavaScript work, all included third parties in a website can operate completely unrestricted—meaning they have full access to all resources of the website—just as the website's original code has. (The exception is cross-domain <iframe> tags, which are so limiting that they cannot be used in many situations.)
Websites are sometimes hurt by the third-party because of this lack of restrictions. For example, a third-party's server could be breached, and malicious code could deform the website, or steal users' data (mainly on sites with log-in). And/or a third-party may replace a website's paid ads with its own ads. And/or a third-party can harvest information on the users, to be stored on cookies and allow better targeting of ads on other websites (a.k.a. “behavioral targeting”). Websites want to get paid to allow such harvesting, but any third-party—even one which is in-directly included—can do that without paying the website.
Therefore, there is a great need for a computerized system that allows websites to execute third-party computer code under restricted permissions to prevent undesired third-party activity that adversely affects the client user device. In particular, there is a need within the industry for a computer system, method(s), and non-transitory computer readable storage medium to assist a user, such as a website administrator, in defining and enforcing limitations on third-party activity in real-time. Many types of third-party activity that may be undesirable by the site's administrator should be mediated by the system via the combination of functionality, for example (to be explained herein): Enclosure iFrame; Reflection; DOM functionality overriding; Instrumentation; Policy-Center; Evasion; and CORS-Proxy.